package com.zhanggm.springcloud.student.service;

import com.zhanggm.springcloud.student.entity.AreaEntiy;
import com.zhanggm.springcloud.student.entity.ClassesEntiy;
import com.zhanggm.springcloud.student.entity.HobbyEntiy;
import com.zhanggm.springcloud.student.entity.StudentEntiy;
import org.springframework.data.domain.Page;

import java.util.List;

public interface StudentServie {
    /**
     * 添加班级
     * @param classesEntiy
     * @return
     */
    ClassesEntiy addClasses(ClassesEntiy classesEntiy);

    /**
     * 查询所有班级
     * @return
     */
    List<ClassesEntiy> getClassesAll();

    /**
     * 保存学生信息（添加、修改）
     * @param studentEntiy
     * @return
     */
    StudentEntiy save(StudentEntiy studentEntiy);

    /**
     * 分页查询学生信息
     * @param studentEntiy
     * @param pageNum
     * @param pageSize
     * @return
     */
    Page<StudentEntiy> getPageInfo(StudentEntiy studentEntiy,Integer pageNum,Integer pageSize);

    /**
     * 按Id删除
     * @param id
     * @return
     */
    boolean deleteById(Long id);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    boolean deleteByIds(String ids);

    /**
     * 批量删除
     * @return
     */
    boolean deleteByIds(List<Long> ids);

    /**
     * 根据Id，查询学生
     * @param id
     * @return
     */
    StudentEntiy getById(Long id);

    /**
     * 按pid查询地区列表
     * @param pid
     * @return
     */
    List<AreaEntiy> getAreaListByPid(Long pid);

    /**
     * 查询地区列表树
     * @return
     */
    List<AreaEntiy> getAreaTree();

    /**
     * 查询所有爱好
     * @return
     */
    List<HobbyEntiy> getHobbyAll();

    /**
     * 根据学生Id查询爱好
     * @param studentId
     * @return
     */
    List<Long> getHobbyIdListByStudentId(Long studentId);


}
